-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Site Editor: Organise semantic template parts #29030
Conversation
Size Change: +292 B (0%) Total Size: 1.38 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works! :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Considering that most of the sites will likely have just one template part per area, one downside of organizing things this way is that it introduces one more click to get to the menu with only one item. On the other hand, it better communicates what template parts are and their relationship with templates so it might be worthwhile to try this out.
title: __( 'Sidebars' ), | ||
}, | ||
{ | ||
area: null, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to aligning this with corresponding value in @Addison-Stavlo's PR #28410, that is to use uncategorized
here too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
null
includes all template parts from the areas that aren't specified in this constant array. In this case template parts with header
, footer
or sidebar
will be excluded from General but everything else will be included. This only matters if a theme has an area besides the header,footer and sidebar. So basically null
is a catch-all, excluding items from the three other areas.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What I was trying to say is that is that we are using uncategorized
for the same thing (catch-all) on back end.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just checked the code you are right. I thought we allow other areas as well. I'll update the code to use uncategorized
Description
Fixes #27877
How has this been tested?
Screenshots
Types of changes
New feature (non-breaking change which adds functionality)
Checklist: